PostgreSQL manages database access permissions using users and groups. Users own database objects (for example, tables) and can assign privileges on those objects to other users to control who has access to which objects.
Note: Starting from PostgreSQL version 8.1, users and groups were no longer distinct kinds of entities, now there are only roles. Any role can act as a user, a group, or both. The concept of roles subsumes the concepts of users and groups.
Navicat provides User to add, duplicate, edit, delete users/groups/roles, grant/revoke server privileges and privileges on the selected database objects. The object pane displays all the users/groups/roles that exist in the server.
Only a superuser (a user who is allowed all rights) can add/delete users. PostgreSQL installs a single superuser by default named postgres. All other users must be added by this user, or by another subsequently added superuser.
The User for PostgreSQL Server 7.3 to 8.0 and PostgreSQL Server 8.1 to 9.0 are different.
PostgreSQL Server 7.3 to 8.0
Manage User
Just simply click -> User to open an object pane for User. A control-click displays the popup menu or use the object pane toolbar, allowing you to add, edit and delete users.
Add User
To add a new user
- Select the connection you wish to set privileges in the navigation pane.
- Click
-> User to open the User showing the user list.
- Click the
from the object pane toolbar or control-click and select New User from the popup menu.
- Edit user properties and privileges on the appropriate tabs of the User Designer.
To create a new user with modification as one of the existing users
- Select the connection you wish to set privileges in the navigation pane.
- Click
-> User to open the User showing the user list.
- Select a user to edit in the object pane.
- Control-click the user and select Duplicate User from the popup menu.
- Edit user properties and privileges on the appropriate tabs of the User Designer.
Edit User
To edit an existing user
- Select the connection you wish to set privileges in the navigation pane.
- Click
-> User to open the User showing the user list.
- Select a user to edit in the object pane.
- Click the
from the object pane toolbar or control-click the user and select Design User from the popup menu.
- Edit user properties and privileges on the appropriate tabs of the User Designer.
Delete User
To delete a user
- Select the connection you wish to set privileges in the navigation pane.
- Click
-> User to open the User showing the user list.
- Select a user to delete in the object pane.
- Click the
from the object pane toolbar or control-click the user and select Delete User from the popup menu.
- Confirm deleting in the dialog window.
Manage Group
Just simply click -> Group to open an object pane for Group. A control-click displays the popup menu or use the object pane toolbar, allowing you to add, edit and delete groups.
Add Group
To add a new group
- Select the connection you wish to set privileges in the navigation pane.
- Click
-> Group to open the Group showing the group list.
- Click the
from the object pane toolbar or control-click and select New Group from the popup menu.
- Edit group properties and privileges on the appropriate tabs of the Group Designer.
To create a new group with modification as one of the existing groups
- Select the connection you wish to set privileges in the navigation pane.
- Click
-> Group to open the Group showing the group list.
- Select a group to edit in the object pane.
- control-click the group and select Duplicate Group from the popup menu.
- Edit group properties and privileges on the appropriate tabs of the Group Designer.
Edit Group
To edit an existing group
- Select the connection you wish to set privileges in the navigation pane.
- Click
-> Group to open the Group showing the group list.
- Select a group to edit in the object pane.
- Click the
from the object pane toolbar or control-click the group and select Design Group from the popup menu.
- Edit group properties and privileges on the appropriate tabs of the Group Designer.
Delete Group
To delete a group
- Select the connection you wish to set privileges in the navigation pane.
- Click
-> Group to open the Group showing the group list.
- Select a group to delete in the object pane.
- Click the
from the object pane toolbar or control-click the group and select Delete Group from the popup menu.
- Confirm deleting in the dialog window.
PostgreSQL Server 8.1 to 9.0
Just simply click to open an object pane for Role. A control-click displays the popup menu or use the object pane toolbar, allowing you to add, edit and delete roles.
Add Role
To add a new role
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Role showing the role list.
- Click the
from the object pane toolbar or control-click and select New Role from the popup menu.
- Edit role properties and privileges on the appropriate tabs of the Role Designer.
To create a new role with modification as one of the existing roles
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Role showing the role list.
- Select a role to edit in the object pane.
- control-click the role and select Duplicate Role from the popup menu.
- Edit role properties and privileges on the appropriate tabs of the Role Designer.
Edit Role
To edit an existing role
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Role showing the role list.
- Select a role to edit in the object pane.
- Click the
from the object pane toolbar or control-click the role and select Design Role from the popup menu.
- Edit role properties and privileges on the appropriate tabs of the Role Designer.
Delete Role
To delete a role
- Select the connection you wish to set privileges in the navigation pane.
- Click
to open the Role showing the role list.
- Select a role to delete in the object pane.
- Click the
from the object pane toolbar or control-click the role and select Delete Role from the popup menu.
- Confirm deleting in the dialog window.
Privilege Manager
To edit privilege according to the database objects by using Privilege Manager
- Select the connection you wish to set privileges in the navigation pane.
- Choose Connection -> Set Privileges or control-click the connection and select Set Privileges from the popup menu to open the Privilege Manager window and set privileges.